package cn.hlife.com.hlfhaemocyte.measure;

import android.content.Context;
import android.text.TextUtils;

import org.json.JSONObject;

import java.io.Serializable;
import java.util.ArrayList;

import cn.hlife.com.hlfhaemocyte.measure.view.MeasureFragment;
import cn.hlife.com.hlfhaemocyte.utils.LogUtils;
import cn.hlife.com.hlfhaemocyte.utils.SharedPreferencesUtils;
import cn.hlife.com.hlfhaemocyte.utils.TransformDataUtils;

/**
 * Created by Administrator on 2017/6/21.
 */

public class MersurePrecentor implements IMersurePrecentor {

    private String str_cell;//用户输入的 细胞参数
    private String tempFY;//保存最后一次的负压值
    private int[] dataTEMP = new int[2];//透光度数据
    private double RBCNumber = 0,//红细胞数量
            WBCNUmber = 0,//白细胞数量
            PLTNumber = 0;//血小板数量
    private double HGB_Value = 0;//血红蛋白
    private double HCT_Value = 0;//红细胞压积
    private double PCT_Value = 0;//血小板压积
    private double MPV_Value = 0;//平均血小板的体积
    private double MCV_Value = 0;//平均红细胞体积
    private double MCH_Value = 0;//平均血红蛋白含量
    private double MCHC_Value = 0;//平均血红蛋白浓度
    private double LymPercent_Value = 0;//淋巴细胞百分比
    private double MidPercent_Value = 0;//中间细胞百分比
    private double NeuPercent_Value = 0;//粒细胞百分比
    private double LymNumber_Value = 0;//淋巴细胞数
    private double MidNumber_Value = 0;//中间细胞数
    private double NeuNumber_Value = 0;//粒细胞数
    private double RDWCV_Value = 0;//RDWCV 值
    private double PDW_Value = 0;//PDW 值
    private double RDWSD_Value = 0;//RDWSD 值
    private double PLCR_Value = 0;//PLCR 值

    private double MCV_Temp_Value = 0;//平均红细胞体积个数
    private double MPV_Temp_Value = 0;//平均血小板体积个数
    private ArrayList<Integer> RBCNumberSum = new ArrayList<Integer>();//红细胞个数分类    用于绘制直方图
    private ArrayList<Integer> WBCNumberSum = new ArrayList<Integer>();//白细胞个数分类    用于绘制直方图
    private ArrayList<Integer> PLTNumberSum = new ArrayList<Integer>();//血小板个数分类    用于绘制直方图

    private ArrayList<Integer> LymNumberSum = new ArrayList<Integer>();//淋巴细胞（淋巴细胞集合）
    private ArrayList<Integer> MidNumberSum = new ArrayList<Integer>();//	中间细胞（淋巴细胞集合）
    private ArrayList<Integer> NeuNumberSum = new ArrayList<Integer>();//粒细胞（粒细胞集合）

////    //TODO   测试数据
//    public ArrayList<Integer> sum1 = new ArrayList<Integer>();
//    public ArrayList<Integer> sum2 = new ArrayList<Integer>();
//    public ArrayList<Integer> sum3 = new ArrayList<Integer>();
    private OnMeansureListener onMeansureListener;
    private Context context;
    private String
//            RBC_threshold_value,//红细胞体积阈值
//            PLT_threshold_Value,//血小板体积阈值
            WBC_A_threshold_value, //白细胞体积阈值A
            WBC_B_threshold_value,//白细胞体积阈值B
            WL_xs_value,//淋巴细胞系数
            WM_xs_value,//中间细胞系数
            WG_xs_value,//粒细胞系数
            RBC_xs_value,//红细胞系数
            WBC_xs_value,//白细胞系数
            PLT_xs_value,//血小板系数
            RBC_MCV_value,////红细胞压积系数
            PLT_MPV_value;//血小板压积系数

    public void addMeasureListener(OnMeansureListener onMeansureListener) {
        this.onMeansureListener = onMeansureListener;
    }

    public MersurePrecentor(Context context) {
        this.context = context;
    }

    @Override
    public void filtrateMeasureData(String temp,int measureMode) {
        if(!temp.startsWith("bb03050101")&&!temp.endsWith("bb03050100")){
            return;
        }
        if(measureMode== MeasureFragment.MEASURE_QX){
            str_cell = SharedPreferencesUtils.getInstance().getFullBloodCellParameter(context);
        }else if(measureMode== MeasureFragment.MEASURE_XSY||measureMode== MeasureFragment.MEASURE_YXS){
            str_cell = SharedPreferencesUtils.getInstance().getDiluentCellParameter(context);
        }
        WBC_A_threshold_value= (WBC_A_threshold_value = getParameterData("WBC_A")) == null ? "0" : WBC_A_threshold_value;
        WBC_B_threshold_value=(WBC_B_threshold_value = getParameterData("WBC_B"))== null ? "0" : WBC_B_threshold_value;
        WL_xs_value=(WL_xs_value = getParameterData("WL_xs")) == null ? "0" : WL_xs_value;
        WM_xs_value=(WM_xs_value = getParameterData("WM_xs"))== null ? "0" : WM_xs_value;
        WG_xs_value=(WG_xs_value = getParameterData("WG_xs"))== null ? "0" : WG_xs_value;
        RBC_xs_value= (RBC_xs_value = getParameterData("RBC_xs"))==null ? "0" : RBC_xs_value;
        WBC_xs_value= (WBC_xs_value = getParameterData("WBC_xs"))==null ? "0" : WBC_xs_value;
        PLT_xs_value=(PLT_xs_value = getParameterData("PLT_xs"))==null ? "0" : PLT_xs_value;
        RBC_MCV_value=(RBC_MCV_value = getParameterData("RBC_MCV"))==null ? "0" : RBC_MCV_value;
        PLT_MPV_value=( PLT_MPV_value = getParameterData("PLT_MPV"))==null ? "0" : PLT_MPV_value;
        String FYvalue = null;
        while (temp.length() > 0) {
            if (temp.startsWith("bb03050101")) {//测量开始
                FYvalue = temp.substring(0, 10);
                temp = temp.substring(10, temp.length());
//                LogUtils.e("----测量开始--->" + FYvalue);
                RBCNumberSum.clear();
                WBCNumberSum.clear();
                PLTNumberSum.clear();
                LymNumberSum.clear();
                MidNumberSum.clear();
                NeuNumberSum.clear();
            } else if (temp.startsWith("bb0303")) {//测量负压
                tempFY = temp.substring(0, 10);
                temp = temp.substring(10, temp.length());
//            LogUtils.e("----负压值--->" + tempFY);
            }else  if(temp.startsWith("dd0402")){//红细胞平均体积个数
                FYvalue = temp.substring(0, 10);
                temp = temp.substring(10, temp.length());
                byte []   bytes=TransformDataUtils.hexStringToByteArray(FYvalue);
                byte[] bytemp = new byte[2];

                bytemp[0] = bytes[3];
                bytemp[1] = bytes[4];
                MCV_Temp_Value=TransformDataUtils.bytes2short(bytemp);
//                LogUtils.e("红细胞平均体积个数-->" + MCV_Temp_Value);

            } else  if(temp.startsWith("dd0403")){
//                FYvalue = temp.substring(0, 10);
                temp = temp.substring(10, temp.length());

//                byte []   bytes=TransformDataUtils.hexStringToByteArray(FYvalue);
//                MCV_Temp_Value=TransformDataUtils.bytes2short(bytes);

            }else  if(temp.startsWith("dd0404")){//血小板平均体积个数
                FYvalue = temp.substring(0, 10);
                temp = temp.substring(10, temp.length());
                byte []   bytes=TransformDataUtils.hexStringToByteArray(FYvalue);
                byte[] bytemp = new byte[2];

                bytemp[0] = bytes[3];
                bytemp[1] = bytes[4];
                MPV_Temp_Value=TransformDataUtils.bytes2short(bytemp);
//                LogUtils.e("血小板平均体积个数："+MPV_Temp_Value);

            }else if (temp.startsWith("dd0301")) {//透光度数据
                FYvalue = temp.substring(0, 10);
//                LogUtils.e("----透光度--->" + FYvalue);

                temp = temp.substring(10, temp.length());
                byte[] bytemp = new byte[2];
                byte[] result = TransformDataUtils.hexStringToByteArray(FYvalue);
                bytemp[0] = result[3];
                bytemp[1] = result[4];
                if (dataTEMP[0] == 0) {
                    dataTEMP[0] = TransformDataUtils.bytes2short(bytemp);
                } else {
                    dataTEMP[1] = TransformDataUtils.bytes2short(bytemp);
                }
//                LogUtils.e("透光度tg[0]-->" + dataTEMP[0]);
//                LogUtils.e("透光度tg[1]-->" + dataTEMP[1]);

            } else if (temp.startsWith("dd0302")) {//红细胞分类个数
                FYvalue = temp.substring(0, 10);

//                LogUtils.e("----红细胞数据--->" + FYvalue);

                temp = temp.substring(10, temp.length());
                byte[] result = TransformDataUtils.hexStringToByteArray(FYvalue);
                byte[] bytemp = new byte[2];
                bytemp[0] = result[3];
                bytemp[1] = result[4];
                int tempInt = TransformDataUtils.bytes2short(bytemp);

                RBCNumberSum.add(tempInt);

//                if (!TextUtils.isEmpty(RBC_threshold_value)) {
//                    //设定红细胞的阈值 ，当红细胞体积大于设定的值的时候再进行平均值计算
//                    if (tempInt > Double.valueOf(RBC_threshold_value)) {
//
//                    }
//                }
//                sum1.add(tempInt);

            } else if (temp.startsWith("dd0303")) {//白细胞分类个数数据

                FYvalue = temp.substring(0, 10);
//                 LogUtils.e("---白细胞数据---->" + FYvalue);
                temp = temp.substring(10, temp.length());
                byte[] bytemp = new byte[2];
                byte[] result = TransformDataUtils.hexStringToByteArray(FYvalue);
                bytemp[0] = result[3];
                bytemp[1] = result[4];
                int tempInt = TransformDataUtils.bytes2short(bytemp);
                WBCNumberSum.add(tempInt);
                if (!TextUtils.isEmpty(WBC_A_threshold_value)) {
                    //设定白细胞的阈值 ，小于A的数量为L，大于A小于B的为M，大于B的为G
                    //过滤细胞  淋巴细胞、中间细胞、粒细胞
                    if (tempInt < Double.valueOf(WBC_A_threshold_value)) {
                        LymNumberSum.add(tempInt);
                    } else if (tempInt > Double.valueOf(WBC_A_threshold_value) && tempInt < Double.valueOf(WBC_B_threshold_value)) {
                        MidNumberSum.add(tempInt);
                    } else if (tempInt > Double.valueOf(WBC_B_threshold_value)) {
                        NeuNumberSum.add(tempInt);
                    }
                }

            } else if (temp.startsWith("dd0304")) {//血小板数据
                FYvalue = temp.substring(0, 10);
//                LogUtils.e("----血小板数据--->" + FYvalue);
                temp = temp.substring(10, temp.length());
                byte[] result = TransformDataUtils.hexStringToByteArray(FYvalue);
                byte[] bytemp = new byte[2];
                bytemp[0] = result[3];
                bytemp[1] = result[4];
                int tempInt = TransformDataUtils.bytes2short(bytemp);
                PLTNumberSum.add(tempInt);
//                if (!TextUtils.isEmpty(PLT_threshold_Value)) {
//                    //根据设定血小板的阈值  过滤血小板细胞
//                    if (tempInt < Double.valueOf(PLT_threshold_Value)) {
//                        PLTNumberSum.add(tempInt);
//
//                    }
//                }
//                sum3.add(tempInt);
            } else if (temp.startsWith("dd0442")) {//红细胞数量
                FYvalue = temp.substring(0, 12);
//                LogUtils.e("---红细胞数量---->" + FYvalue);
                temp = temp.substring(12, temp.length());
                byte[] bytemp = new byte[2];
                byte[] result = TransformDataUtils.hexStringToByteArray(FYvalue);
                bytemp[0] = result[4];
                bytemp[1] = result[5];
                int RBCNumberTemp = TransformDataUtils.bytes2short(bytemp);
                if (!TextUtils.isEmpty(RBC_xs_value)) {
                    RBCNumber = RBCNumberTemp * Double.valueOf(RBC_xs_value);
                }
//                LogUtils.e("红细胞数量：" + RBCNumber);

            } else if (temp.startsWith("dd0443")) {//白细胞数量
                FYvalue = temp.substring(0, 12);
//                LogUtils.e("---白细胞数量---->" + FYvalue);
                temp = temp.substring(12, temp.length());
                byte[] result = TransformDataUtils.hexStringToByteArray(FYvalue);

                byte[] bytemp = new byte[2];
                bytemp[0] = result[4];
                bytemp[1] = result[5];
                int WBCNUmberTemp = TransformDataUtils.bytes2short(bytemp);
                if (!TextUtils.isEmpty(WBC_xs_value)) {
                    WBCNUmber = WBCNUmberTemp * Double.valueOf(WBC_xs_value);
                }
//                LogUtils.e("白细胞数量：" + WBCNUmber);

            } else if (temp.startsWith("dd0444")) {//血小板数量
                FYvalue = temp.substring(0, 12);
//                LogUtils.e("---血小板数量---->" + FYvalue);

                temp = temp.substring(12, temp.length());
                byte[] result = TransformDataUtils.hexStringToByteArray(FYvalue);
                byte[] bytemp = new byte[2];
                bytemp[0] = result[4];
                bytemp[1] = result[5];
                int PLTNumberTemp = TransformDataUtils.bytes2short(bytemp);
                if (!TextUtils.isEmpty(PLT_xs_value)) {
                    PLTNumber = PLTNumberTemp * Double.valueOf(PLT_xs_value);
                }
//                LogUtils.e("血小板数量：" + PLTNumber);

            } else if (temp.equals("bb03050100")) {//测量结束
//                LogUtils.e("---测量结束---->" + FYvalue);
                FYvalue = temp.substring(0, 10);
                temp = temp.substring(10, temp.length());
                caculateHGB();//血红蛋白
                caculateMCV();//平均红细胞体积
                caculateHCT();//红细胞压积
                caculateMCH();//平均血红蛋白含量
                caculateMCHC();//平均血红蛋白浓度
                LymPercent_Value = calculatePercent(LymNumberSum.size() * Double.valueOf(WL_xs_value));//根据PL值计算淋巴细胞的 百分比
                MidPercent_Value = calculatePercent(MidNumberSum.size() * Double.valueOf(WM_xs_value));//根据PM值计算中间细胞的 百分比
                NeuPercent_Value = calculatePercent(NeuNumberSum.size() * Double.valueOf(WG_xs_value));// 根据PG值计算 粒细胞的百分比
                LymNumber_Value = LymPercent_Value * WBCNUmber / 100;//淋巴细胞数
                MidNumber_Value = MidPercent_Value * WBCNUmber / 100;//中间细胞数
                NeuNumber_Value = NeuPercent_Value * WBCNUmber / 100;//粒细胞数
                caculateMPV();//平均血小板体积
                caculatePCT();//血小板压积
                caculateRDWCV();
                caculatePDW();
                caculateRDWSD();
                caculatePLCR();
                onMeansureListener.finishMeasure();


//                StringBuffer stringBuffer1=new StringBuffer();
//                for(int  i=0;i<sum1.size();i++){
//                    stringBuffer1.append(sum1.get(i)+"\n");
//                }
//                SDCardUtils.saveFileToExternalCacheDir(context,stringBuffer1.toString().getBytes(),"红细胞");
//                StringBuffer stringBuffer2=new StringBuffer();
//                for(int  i=0;i<sum2.size();i++){
//                    stringBuffer2.append(sum2.get(i)+"\n");
//                }
//                SDCardUtils.saveFileToExternalCacheDir(context,stringBuffer2.toString().getBytes(),"白细胞");
//                StringBuffer stringBuffer3=new StringBuffer();
//                for(int  i=0;i<sum3.size();i++){
//                    stringBuffer3.append(sum3.get(i)+"\n");
//                }
//                SDCardUtils.saveFileToExternalCacheDir(context,stringBuffer3.toString().getBytes(),"血小板");

            }
        }
    }

    /**
     * 计算 淋巴细胞、中间细胞、粒细胞百分比
     */
    private double calculatePercent(double value) {
        double PL = LymNumberSum.size() * Double.valueOf(WL_xs_value);
        double PM = MidNumberSum.size() * Double.valueOf(WM_xs_value);
        double PG = NeuNumberSum.size() * Double.valueOf(WG_xs_value);
        double   temp=PL + PM + PG;
        if(temp==0){
            return 0;
        }
        return value / temp * 100;
    }

    ;

    @Override
    public double caculateHGB() {
        if (HGB_Value == 0) {
            String strHGB_xs_value = getParameterData("HGB_xs");
            String strTEMP_value = getParameterData("TEMP");
            double HGB_xs = 0, TEMP = 0;
            if (!TextUtils.isEmpty(strTEMP_value)) {
                HGB_xs = Double.valueOf(strHGB_xs_value);
                TEMP = Double.valueOf(strTEMP_value);
            }
            int value0 = dataTEMP[0];
            int value1 = dataTEMP[1];
            int avg = (value0 + value1) / 2;
            HGB_Value = HGB_xs * Math.log10(TEMP / avg);
        }
        return HGB_Value;
    }

    @Override
    public double caculateMCH() {
        if (MCH_Value == 0) {
            MCH_Value = caculateHGB() / RBCNumber;
        }
        return MCH_Value;
    }

    @Override
    public double caculateMCHC() {
        if (MCHC_Value == 0) {
            MCHC_Value = caculateHGB() / caculateHCT() * 100;
        }

        return MCHC_Value;
    }

    public double getRDWCV_Value() {
        return RDWCV_Value;
    }

    public void  caculateRDWCV() {
        double sum = 0;
        for (int i=0;i<RBCNumberSum.size();i++){
            sum +=(Math.pow(20+40*i,2)-MCV_Temp_Value)*RBCNumberSum.get(i);
        }
        sum= Math.sqrt(sum/RBCNumber);
       String value= getParameterData("RDWCV");
        if(!TextUtils.isEmpty(value)){
            RDWCV_Value= sum/MCV_Value*100*Double.valueOf(value);
        }
    }


    @Override
    public void caculatePLCR() {

        String value= getParameterData("PLCR");
        if(!TextUtils.isEmpty(value)){
            int  num=Integer.parseInt(value);
            int  sum=0;
            for(int i=num;i<PLTNumberSum.size();i++){
                sum+=PLTNumberSum.get(i);
            }
            PLCR_Value=sum/PLTNumber*100;
        }
    }
    @Override
    public void caculateRDWSD() {
        int  MAXnumber=0;
        int  index=0;
        for(int  i=0;i<RBCNumberSum.size();i++){
            int temp = RBCNumberSum.get(i);
            if(MAXnumber<temp){
                MAXnumber=temp;
                index=i+1;
            }
        }
        double   pNumber=MAXnumber*0.2;

        double  tempL=1000;
        int  NumberLIndex=0;
        int CurrentNumber=0;
        for(int  i=0;i<index;i++){
            int temp = RBCNumberSum.get(i);
            double  Number1=Math.abs(pNumber-temp);
            if(Number1<tempL){
                CurrentNumber=temp;
                NumberLIndex=i;
                tempL=Number1;
            }
        }
        int  calculateNumb1=(int)(pNumber*NumberLIndex)/(CurrentNumber==0?1:CurrentNumber);


        double  tempH=1000;
        int  NumberHIndex=0;
        int CurrentNumber2=0;
        for(int  i=index;i<RBCNumberSum.size();i++){
            int temp = RBCNumberSum.get(i);
            double Number1=Math.abs(pNumber-temp);
            if(Number1<tempH){
                CurrentNumber2=temp;
                tempH=Number1;
                NumberHIndex=i;
            }
        }
        int  calculateNumb2=(int)(pNumber*(100-NumberHIndex))/(CurrentNumber2==0?1:CurrentNumber2);

        String value= getParameterData("RDWSD");
        if(!TextUtils.isEmpty(value)){
            RDWSD_Value= ((100-calculateNumb2)-calculateNumb1)*Double.valueOf(value);
        }
    }


    @Override
    public void caculatePDW() {
        int  MAXnumber=0;
        int  index=0;
        for(int  i=0;i<PLTNumberSum.size();i++){
            int temp = PLTNumberSum.get(i);
            if(MAXnumber<temp){
                MAXnumber=temp;
                index=i+1;
            }
        }
         double   pNumber=MAXnumber*0.2;

        double  tempL=1000;
        int  NumberLIndex=0;
        int CurrentNumber=0;
        for(int  i=0;i<index;i++){
            int temp = PLTNumberSum.get(i);
            double  Number1=Math.abs(pNumber-temp);
            if(Number1<tempL){
                CurrentNumber=temp;
                NumberLIndex=i;
                tempL=Number1;
            }
        }
        int  calculateNumb1=(int)(pNumber*NumberLIndex)/(CurrentNumber==0?1:CurrentNumber);


        double  tempH=1000;
        int  NumberHIndex=0;
        int CurrentNumber2=0;
        for(int  i=index;i<PLTNumberSum.size();i++){
            int temp = PLTNumberSum.get(i);
            double Number1=Math.abs(pNumber-temp);
            if(Number1<tempH){
                CurrentNumber2=temp;
                tempH=Number1;
                NumberHIndex=i;
            }
        }
        int  calculateNumb2=(int)(pNumber*(100-NumberHIndex))/CurrentNumber2==0?1:CurrentNumber2;

        String value= getParameterData("PDW");
        if(!TextUtils.isEmpty(value)){
            PDW_Value= ((100-calculateNumb2)-calculateNumb1)*Double.valueOf(value);
        }
    }
    @Override
    public double caculateRBCNumber() {
        return RBCNumber;
    }

    @Override
    public double caculateWBCNUmber() {
        return WBCNUmber;
    }

    @Override
    public double caculatePLTNumber() {
        return PLTNumber;
    }

    @Override
    public double caculateHCT() {
        HCT_Value = RBCNumber * caculateMCV() / 10;
        return HCT_Value;
    }

    @Override
    public double caculateMPV() {
        MPV_Value = MPV_Temp_Value * Double.valueOf(PLT_MPV_value);
//
//        if (MPV_Value == 0) {
//            double doubleSum = 0;
//            if (PLTNumberSum.size() == 0) {
//                return 0;
//            }
//            for (int i = 0; i < PLTNumberSum.size(); i++) {
//                doubleSum = doubleSum + PLTNumberSum.get(i);
//            }
//            double a = doubleSum / PLTNumberSum.size();
//
//            if (!TextUtils.isEmpty(PLT_MPV_value)) {
//                MPV_Value = a * Double.valueOf(PLT_MPV_value);
//            }
//        }
        return MPV_Value;
    }

    @Override
    public double caculateMCV() {
        MCV_Value = MCV_Temp_Value * Double.valueOf(RBC_MCV_value);
//        if (MCV_Value == 0) {
//            double doubleSum = 0;
//            if (RBCNumberSum.size() == 0) {
//                return 0;
//            }
//            for (int i = 0; i < RBCNumberSum.size(); i++) {
//                doubleSum = doubleSum + RBCNumberSum.get(i);
//            }
//            double a = doubleSum / RBCNumberSum.size();
//            if (!TextUtils.isEmpty(RBC_MCV_value)) {
//                MCV_Value = a * Double.valueOf(RBC_MCV_value);
//            }
//        }
        return MCV_Value;
    }

    @Override
    public double caculatePCT() {
        PCT_Value = caculateMPV() * PLTNumber / 1000;
        return PCT_Value;
    }

    /**
     * 获取 SP 参数
     *
     * @param key
     * @return
     */
    private String getParameterData(String key) {
        String valueStr = null;
        try {
            if (!TextUtils.isEmpty(str_cell)) {
                JSONObject jsonRBCAbout = new JSONObject(str_cell);
                valueStr = jsonRBCAbout.getString(key);
            }
        } catch (Exception e) {
            LogUtils.e("出错信息：" + e.getMessage());
        }
        return valueStr;
    }

    public String getTempFY() {
        return tempFY;
    }

    public double getMCHC_Value() {
        return MCHC_Value;
    }

    public double getRBCNumber() {
        return RBCNumber;
    }

    public double getMCH_Value() {
        return MCH_Value;
    }

    public double getWBCNUmber() {
        return WBCNUmber;
    }

    public double getPLTNumber() {
        return PLTNumber;
    }


    public double getHGB_Value() {
        return HGB_Value;
    }


    public double getHCT_Value() {
        return HCT_Value;
    }


    public double getPCT_Value() {
        return PCT_Value;
    }

    public double getMPV_Value() {
        return MPV_Value;
    }


    public double getMCV_Value() {
        return MCV_Value;
    }


    public double getLymPercent_Value() {
        return LymPercent_Value;
    }


    public double getMidPercent_Value() {
        return MidPercent_Value;
    }


    public double getNeuPercent_Value() {
        return NeuPercent_Value;
    }

    public ArrayList<Integer> getRBCNumberSum() {
        return RBCNumberSum;
    }

    public ArrayList<Integer> getPLTNumberSum() {
        return PLTNumberSum;
    }

    public ArrayList<Integer> getWBCNumberSum() {
        return WBCNumberSum;
    }

    public double getLymNumber_Value() {
        return LymNumber_Value;
    }


    public double getMidNumber_Value() {
        return MidNumber_Value;
    }


    public double getNeuNumber_Value() {
        return NeuNumber_Value;
    }

    public double getMCV_Temp_Value() {
        return MCV_Temp_Value;
    }

    public double getMPV_Temp_Value() {
        return MPV_Temp_Value;
    }

    public void setMCV_Temp_Value(double MCV_Temp_Value) {
        this.MCV_Temp_Value = MCV_Temp_Value;
    }

    public double getPDW_Value() {
        return PDW_Value;
    }

    public double getRDWSD_Value() {
        return RDWSD_Value;
    }

    public double getPLCR_Value() {
        return PLCR_Value;
    }
}
